var assert = require('assert');

describe('array 01', function () {
    let arr = []

    beforeEach(() => {
        console.log('beforeEach 01 ----')
        arr = [1, 2, 3]
    });

    it('indexOf', function (done) {
        setTimeout(() => {
            assert.deepStrictEqual(arr.indexOf(1), 0)
            assert.deepStrictEqual(arr.indexOf(4), -1)
            done()
        }, 1000)
    })

    it('map', function () {
        assert.deepStrictEqual(arr.map(x => x*x), [1, 4, 9])
    })

})

describe('array 02', function () {
    let arr = []

    beforeEach(() => {
        console.log('beforeEach 01 ----')
        arr = [1, 2, 3]
    });

    it.skip('indexOf', function (done) {
        setTimeout(() => {
            assert.deepStrictEqual(arr.indexOf(1), 0)
            assert.deepStrictEqual(arr.indexOf(4), -1)
            done()
        }, 1000)
    })

    it('map', function () {
        assert.deepStrictEqual(arr.map(x => x*x), [1, 4, 9])
    })

})